﻿//Copyright (C) <2013>  <jonathan cleeve norton> All Rights Reserved All Rights Reserved All Rights Reserved 
//Contact jon.norton@fin-plus.co.uk website <http://www.fin-plus.co.uk/>
using System.Linq;

namespace FinPlusAssembler
{
    public static class NumericExtension
    {
        public static int DecimalPlaces(this double value)
        {
            var res = value.ToString().Split('.');
            if (res.Count() < 2)
                return 0;

            return res[1].Length;
        }
    }
}
